import java.util.*;


class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNext()){
            int a = in.nextInt();
            int b = in.nextInt();
            System.out.println(med(a,b));
        }


    }

    public static int med(int m,int n){
        if (n == 1 && m >= 1 || m == 1 && n >= 1){
            return m+n;
        }
        return med(m-1,n) + med (m,n-1);
    }
}

class UnusualAdd {
    public int addAB(int A, int B) {
        // write code here
        if(B == 0){
            return A;
        }
        int sum = 0;
        int carray = 0;
        while (B != 0){
            sum = A^B;
            carray = (A&B) << 1;
            A = sum;
            B = carray;

        }
        return A;
    }
}
public class Test {
}
